import request from "../../utils/request.js"

const state = {
	centerData:{}
}
const mutations = {
	SET_CENTERLIST(state,centerData){
		state.centerData = centerData
	}
}
const actions = {
	async getCenterList({commit}){
		const result = await request('/getCenterData')
		// console.log(result);
		commit('SET_CENTERLIST',result)
	}
}
const getters = {
	centerList(state){
		return state.centerData.list || []
	},
	
	avatar(){
		return state.centerData.avatar || ''
	}
}

export default {
	state,
	mutations,
	actions,
	getters
}